/**
 * 顺序查找
 * @param array 数组
 * @param num 查找的数字
 * @returns 返回索引
 */
export function sequenceSearch(array: number[], num: number) {
  for (let i = 0; i < array.length; i++) {
    if (array[i] === num) {
      return i;
    }
  }
  return -1;
}

// const index = sequenceSearch([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 6);
// console.log(index);

export {};
